<!DOCTYPE html>
<html lang="en" dir="ltr" class="client-nojs">
<head>
<meta charset="UTF-8" />
<title>love.graphics.printf - LOVE</title>
<meta name="generator" content="MediaWiki 1.24.2" />
<link rel="ExportRDF" type="application/rdf+xml" title="love.graphics.printf" href="" />
<link rel="shortcut icon" href="favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="opensearch_desc.php" title="LOVE (en)" />
<link rel="EditURI" type="application/rsd+xml" href="api.php_action_rsd" />
<link rel="alternate" hreflang="x-default" href="" />
<link rel="copyright" href="http://www.gnu.org/copyleft/fdl.html" />
<link rel="alternate" type="application/atom+xml" title="LOVE Atom feed" href="" />
<link rel="stylesheet" href="" />
<!--[if IE 6]><link rel="stylesheet" href="ie60fixes.css" media="screen" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" href="ie70fixes.css" media="screen" /><![endif]--><meta name="ResourceLoaderDynamicStyles" content="" />
<link rel="stylesheet" href="" />
<style>a:lang(ar),a:lang(kk-arab),a:lang(mzn),a:lang(ps),a:lang(ur){text-decoration:none}
/* cache key: love2d_wiki:resourceloader:filter:minify-css:7:daf253d59690fd9cabb6b95510bce103 */</style>
<script src=""></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"love.graphics.printf","wgTitle":"love.graphics.printf","wgCurRevisionId":22714,"wgRevisionId":22714,"wgArticleId":142,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Functions"],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"love.graphics.printf","wgIsProbablyEditable":false,"wgRestrictionEdit":[],"wgRestrictionMove":[]});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function($,jQuery){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"editfont":"default","editondblclick":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":1,"extendwatchlist":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nickname":"","norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"rcdays":7,"rclimit":50,"rows":25,"showhiddencats":0,"shownumberswatching":1,"showtoolbar":1,"skin":"love","stubthreshold":0,"thumbsize":5,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":1,"watchdefault":1,"watchdeletion":0,"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"watchrollback":0,
"wllimit":250,"useeditwarning":1,"prefershttps":1,"language":"en","variant-gan":"gan","variant-iu":"iu","variant-kk":"kk","variant-ku":"ku","variant-shi":"shi","variant-sr":"sr","variant-tg":"tg","variant-uz":"uz","variant-zh":"zh","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"searchNs102":false,"searchNs103":false,"searchNs104":false,"searchNs105":false,"searchNs108":false,"searchNs109":false,"searchNs500":false,"searchNs501":false,"variant":"en"});},{},{});mw.loader.implement("user.tokens",function($,jQuery){mw.user.tokens.set({"editToken":"+\\","patrolToken":"+\\","watchToken":"+\\"});},{},{});
/* cache key: love2d_wiki:resourceloader:filter:minify-js:7:201bb6cc0b4c032fe7bbe209a0125541 */
}</script>
<script>if(window.mw){
mw.loader.load(["ext.smw.style","mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
</head>
<body class="mediawiki ltr sitedir-ltr ns-0 ns-subject page-love_graphics_printf skin-love action-view">
<div id="globalWrapper">
		<div id="column-content">
			<div id="content" class="mw-body" role="main">
				<a id="top"></a>
				
				
						<div id="p-cactions" role="navigation">
			<h5>Views</h5>

			<div>
				<ul>
				<li id="ca-nstab-main" class="selected"><a href="" title="View the content page [c]" accesskey="c">Page</a></li>
				<li id="ca-talk" class="new"><a href="" title="Discussion about the content page [t]" accesskey="t">Discussion</a></li>
				<li id="ca-viewsource"><a href="" title="This page is protected.&#10;You can view its source [e]" accesskey="e">View source</a></li>
				<li id="ca-history"><a href="" rel="archives" title="Past revisions of this page [h]" accesskey="h">History</a></li>
				</ul>
							</div>
		</div>
	
				<h1 id="firstHeading" class="firstHeading" lang="en">love.graphics.printf</h1>

				<div id="bodyContent">
					<!-- <div id="siteSub">From LOVE</div> -->

					<!-- <div id="contentSub"></div> -->
										<!-- <div id="jump-to-nav" class="mw-jump">Jump to: <a href="#column-one">navigation</a>, <a href="#searchInput">search</a></div> -->

					<!-- start content -->
					<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><p>Draws formatted text, with word wrap and alignment.
</p><p>See additional notes in <a href="love.graphics11.html" title="love.graphics.print">love.graphics.print</a>.
</p><p>The word wrap limit is applied before any scaling, rotation, and other coordinate transformations. Therefore the amount of text per line stays constant given the same wrap limit, even if the scale arguments change.
</p><p>In version <a href="0.91.html" title="0.9.2">0.9.2</a> and earlier, wrapping was implemented by breaking up words by spaces and putting them back together to make sure things fit nicely within the limit provided. However, due to the way this is done, extra spaces between words would end up missing when printed on the screen, and some lines could overflow past the provided wrap limit. In version <a href="0.102.html" title="0.10.0">0.10.0</a> and newer this is no longer the case.
</p><p>In versions prior to <a href="113.html" title="11.0">11.0</a>, color and byte component values were within the range of 0 to 255 instead of 0 to 1.
</p>
<table class="notice" bgcolor="gold" style="border-style:solid;border-width:1px;-moz-border-radius:3px;border-radius:3px;" align="center" width="80%">
<tr>
<td width="1"> <a href="file_o.html" class="image"><img alt="O.png" src="o.png" width="64" height="64" /></a>
</td>
<td>Aligning does not work as one might expect! It doesn't align to the x/y coordinates given, but in a rectangle, where the limit is the width.
</td>
<td width="1">&#160;
</td></tr></table><br />
<table class="notice" bgcolor="gold" style="border-style:solid;border-width:1px;-moz-border-radius:3px;border-radius:3px;" align="center" width="80%">
<tr>
<td width="1"> <a href="file_o.html" class="image"><img alt="O.png" src="o.png" width="64" height="64" /></a>
</td>
<td>Text may appear blurry if it's rendered at non-integer pixel locations.
</td>
<td width="1">&#160;
</td></tr></table><br />
<h2><span class="mw-headline" id="Function">Function</span></h2>
<h3><span class="mw-headline" id="Synopsis">Synopsis</span></h3>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="lua source-lua"><pre class="de1">love<span class="sy0">.</span>graphics<span class="sy0">.</span>printf<span class="br0">&#40;</span> text<span class="sy0">,</span> x<span class="sy0">,</span> y<span class="sy0">,</span> limit<span class="sy0">,</span> align<span class="sy0">,</span> r<span class="sy0">,</span> sx<span class="sy0">,</span> sy<span class="sy0">,</span> ox<span class="sy0">,</span> oy<span class="sy0">,</span> kx<span class="sy0">,</span> ky <span class="br0">&#41;</span></pre></div></div>
<h3><span class="mw-headline" id="Arguments">Arguments</span></h3>
<dl><dt><code><a href="string.html" title="string">string</a> text</code></dt>
<dd> A text string.</dd>
<dt><code><a href="number.html" title="number">number</a> x</code></dt>
<dd> The position on the x-axis.</dd>
<dt><code><a href="number.html" title="number">number</a> y</code></dt>
<dd> The position on the y-axis.</dd>
<dt><code><a href="number.html" title="number">number</a> limit</code></dt>
<dd> Wrap the line after this many horizontal pixels.</dd>
<dt><code><a href="alignmode.html" title="AlignMode">AlignMode</a> align ("left")</code></dt>
<dd> The alignment.</dd></dl>
<div class="new-feature" style="font-weight: bold; background: #b0b0ff; color: black; padding: 2px; padding-left: 8px; -webkit-border-top-left-radius: 10px; -webkit-border-top-right-radius: 10px; -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; border-top-left-radius: 10px; border-top-right-radius: 10px;" data-love-version-note="1">Available since LÖVE <a href="0.9.html" title="0.9.0">0.9.0</a></div><div style="border: 2px solid #b0b0ff; padding: 3px; padding-bottom: 1px; -webkit-border-bottom-right-radius: 10px; -webkit-border-bottom-left-radius: 10px; -moz-border-radius-bottomright: 10px; -moz-border-radius-bottomleft: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px;" data-love-filterable="1" data-love-version-added="0.9.0">
<dl><dt><code><a href="number.html" title="number">number</a> r (0)</code></dt>
<dd> Orientation (radians).</dd>
<dt><code><a href="number.html" title="number">number</a> sx (1)</code></dt>
<dd> Scale factor (x-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> sy (sx)</code></dt>
<dd> Scale factor (y-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> ox (0)</code></dt>
<dd> Origin offset (x-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> oy (0)</code></dt>
<dd> Origin offset (y-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> kx (0)</code></dt>
<dd> Shearing factor (x-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> ky (0)</code></dt>
<dd> Shearing factor (y-axis).</dd></dl>
 </div>
<h3><span class="mw-headline" id="Returns">Returns</span></h3>
<p>Nothing.
</p>
<h2><span class="mw-headline" id="Function_2">Function</span></h2>
<table class="new-section" bgcolor="#d0d0ff" style="margin-top: 1em; padding: 3px; border-radius:5px; -moz-border-radius:5px;" data-newin="&#91;&#91;11.0]]">
<tr>
<td><i> <b>Available since LÖVE <a href="113.html" title="11.0">11.0</a></b> </i>
</td></tr>
<tr>
<td> <small>This variant is not supported in earlier versions.</small>
</td></tr></table>
<h3><span class="mw-headline" id="Synopsis_2">Synopsis</span></h3>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="lua source-lua"><pre class="de1">love<span class="sy0">.</span>graphics<span class="sy0">.</span>printf<span class="br0">&#40;</span> text<span class="sy0">,</span> font<span class="sy0">,</span> x<span class="sy0">,</span> y<span class="sy0">,</span> limit<span class="sy0">,</span> align<span class="sy0">,</span> r<span class="sy0">,</span> sx<span class="sy0">,</span> sy<span class="sy0">,</span> ox<span class="sy0">,</span> oy<span class="sy0">,</span> kx<span class="sy0">,</span> ky <span class="br0">&#41;</span></pre></div></div>
<h3><span class="mw-headline" id="Arguments_2">Arguments</span></h3>
<dl><dt><code><a href="string.html" title="string">string</a> text</code></dt>
<dd> A text string.</dd>
<dt><code><a href="font.html" title="Font">Font</a> font</code></dt>
<dd> The Font object to use.</dd>
<dt><code><a href="number.html" title="number">number</a> x</code></dt>
<dd> The position on the x-axis.</dd>
<dt><code><a href="number.html" title="number">number</a> y</code></dt>
<dd> The position on the y-axis.</dd>
<dt><code><a href="number.html" title="number">number</a> limit</code></dt>
<dd> Wrap the line after this many horizontal pixels.</dd>
<dt><code><a href="alignmode.html" title="AlignMode">AlignMode</a> align ("left")</code></dt>
<dd> The alignment.</dd>
<dt><code><a href="number.html" title="number">number</a> r (0)</code></dt>
<dd> Orientation (radians).</dd>
<dt><code><a href="number.html" title="number">number</a> sx (1)</code></dt>
<dd> Scale factor (x-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> sy (sx)</code></dt>
<dd> Scale factor (y-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> ox (0)</code></dt>
<dd> Origin offset (x-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> oy (0)</code></dt>
<dd> Origin offset (y-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> kx (0)</code></dt>
<dd> Shearing factor (x-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> ky (0)</code></dt>
<dd> Shearing factor (y-axis).</dd></dl>
<h3><span class="mw-headline" id="Returns_2">Returns</span></h3>
<p>Nothing.
</p>
<h2><span class="mw-headline" id="Function_3">Function</span></h2>
<table class="new-section" bgcolor="#d0d0ff" style="margin-top: 1em; padding: 3px; border-radius:5px; -moz-border-radius:5px;" data-newin="&#91;&#91;11.0]]">
<tr>
<td><i> <b>Available since LÖVE <a href="113.html" title="11.0">11.0</a></b> </i>
</td></tr>
<tr>
<td> <small>This variant is not supported in earlier versions.</small>
</td></tr></table>
<h3><span class="mw-headline" id="Synopsis_3">Synopsis</span></h3>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="lua source-lua"><pre class="de1">love<span class="sy0">.</span>graphics<span class="sy0">.</span>printf<span class="br0">&#40;</span> text<span class="sy0">,</span> transform<span class="sy0">,</span> limit<span class="sy0">,</span> align <span class="br0">&#41;</span></pre></div></div>
<h3><span class="mw-headline" id="Arguments_3">Arguments</span></h3>
<dl><dt><code><a href="string.html" title="string">string</a> text</code></dt>
<dd> A text string.</dd>
<dt><code><a href="transform.html" title="Transform">Transform</a> transform</code></dt>
<dd> Transformation object.</dd>
<dt><code><a href="number.html" title="number">number</a> limit</code></dt>
<dd> Wrap the line after this many horizontal pixels.</dd>
<dt><code><a href="alignmode.html" title="AlignMode">AlignMode</a> align ("left")</code></dt>
<dd> The alignment.</dd></dl>
<h3><span class="mw-headline" id="Returns_3">Returns</span></h3>
<p>Nothing.
</p>
<h2><span class="mw-headline" id="Function_4">Function</span></h2>
<table class="new-section" bgcolor="#d0d0ff" style="margin-top: 1em; padding: 3px; border-radius:5px; -moz-border-radius:5px;" data-newin="&#91;&#91;11.0]]">
<tr>
<td><i> <b>Available since LÖVE <a href="113.html" title="11.0">11.0</a></b> </i>
</td></tr>
<tr>
<td> <small>This variant is not supported in earlier versions.</small>
</td></tr></table>
<h3><span class="mw-headline" id="Synopsis_4">Synopsis</span></h3>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="lua source-lua"><pre class="de1">love<span class="sy0">.</span>graphics<span class="sy0">.</span>printf<span class="br0">&#40;</span> text<span class="sy0">,</span> font<span class="sy0">,</span> transform<span class="sy0">,</span> limit<span class="sy0">,</span> align <span class="br0">&#41;</span></pre></div></div>
<h3><span class="mw-headline" id="Arguments_4">Arguments</span></h3>
<dl><dt><code><a href="string.html" title="string">string</a> text</code></dt>
<dd> A text string.</dd>
<dt><code><a href="font.html" title="Font">Font</a> font</code></dt>
<dd> The Font object to use.</dd>
<dt><code><a href="transform.html" title="Transform">Transform</a> transform</code></dt>
<dd> Transformation object.</dd>
<dt><code><a href="number.html" title="number">number</a> limit</code></dt>
<dd> Wrap the line after this many horizontal pixels.</dd>
<dt><code><a href="alignmode.html" title="AlignMode">AlignMode</a> align ("left")</code></dt>
<dd> The alignment.</dd></dl>
<h3><span class="mw-headline" id="Returns_4">Returns</span></h3>
<p>Nothing.
</p>
<h2><span class="mw-headline" id="Function_5">Function</span></h2>
<table class="new-section" bgcolor="#d0d0ff" style="margin-top: 1em; padding: 3px; border-radius:5px; -moz-border-radius:5px;" data-newin="&#91;&#91;0.10.0]]">
<tr>
<td><i> <b>Available since LÖVE <a href="0.102.html" title="0.10.0">0.10.0</a></b> </i>
</td></tr>
<tr>
<td> <small>This variant is not supported in earlier versions.</small>
</td></tr></table>
<h3><span class="mw-headline" id="Synopsis_5">Synopsis</span></h3>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="lua source-lua"><pre class="de1">love<span class="sy0">.</span>graphics<span class="sy0">.</span>printf<span class="br0">&#40;</span> coloredtext<span class="sy0">,</span> x<span class="sy0">,</span> y<span class="sy0">,</span> limit<span class="sy0">,</span> align<span class="sy0">,</span> angle<span class="sy0">,</span> sx<span class="sy0">,</span> sy<span class="sy0">,</span> ox<span class="sy0">,</span> oy<span class="sy0">,</span> kx<span class="sy0">,</span> ky <span class="br0">&#41;</span></pre></div></div>
<h3><span class="mw-headline" id="Arguments_5">Arguments</span></h3>
<dl><dt><code><a href="table.html" title="table">table</a> coloredtext</code></dt>
<dd> A table containing colors and strings to add to the object, in the form of <code>{color1, string1, color2, string2, ...}</code>.
<dl><dt><code><a href="table.html" title="table">table</a> color1</code></dt>
<dd> A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of <code>{red, green, blue, alpha}</code>.</dd>
<dt><code><a href="string.html" title="string">string</a> string1</code></dt>
<dd> A string of text which has a color specified by the previous color.</dd>
<dt><code><a href="table.html" title="table">table</a> color2</code></dt>
<dd> A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of <code>{red, green, blue, alpha}</code>.</dd>
<dt><code><a href="string.html" title="string">string</a> string2</code></dt>
<dd> A string of text which has a color specified by the previous color.</dd>
<dt><code><a href="" class="new" title="tables and strings (page does not exist)">tables and strings</a> ...</code></dt>
<dd> Additional colors and strings.</dd></dl></dd></dl>
<dl><dt><code><a href="number.html" title="number">number</a> x</code></dt>
<dd> The position of the text (x-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> y</code></dt>
<dd> The position of the text (y-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> limit</code></dt>
<dd> The maximum width in pixels of the text before it gets automatically wrapped to a new line.</dd>
<dt><code><a href="alignmode.html" title="AlignMode">AlignMode</a> align</code></dt>
<dd> The alignment of the text.</dd>
<dt><code><a href="number.html" title="number">number</a> angle (0)</code></dt>
<dd> Orientation (radians).</dd>
<dt><code><a href="number.html" title="number">number</a> sx (1)</code></dt>
<dd> Scale factor (x-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> sy (sx)</code></dt>
<dd> Scale factor (y-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> ox (0)</code></dt>
<dd> Origin offset (x-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> oy (0)</code></dt>
<dd> Origin offset (y-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> kx (0)</code></dt>
<dd> Shearing / skew factor (x-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> ky (0)</code></dt>
<dd> Shearing / skew factor (y-axis).</dd></dl>
<h3><span class="mw-headline" id="Returns_5">Returns</span></h3>
<p>Nothing.
</p>
<h3><span class="mw-headline" id="Notes">Notes</span></h3>
<p>The color set by <a href="love.graphics31.html" title="love.graphics.setColor">love.graphics.setColor</a> will be combined (multiplied) with the colors of the text.
</p>
<h2><span class="mw-headline" id="Function_6">Function</span></h2>
<table class="new-section" bgcolor="#d0d0ff" style="margin-top: 1em; padding: 3px; border-radius:5px; -moz-border-radius:5px;" data-newin="&#91;&#91;11.0]]">
<tr>
<td><i> <b>Available since LÖVE <a href="113.html" title="11.0">11.0</a></b> </i>
</td></tr>
<tr>
<td> <small>This variant is not supported in earlier versions.</small>
</td></tr></table>
<h3><span class="mw-headline" id="Synopsis_6">Synopsis</span></h3>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="lua source-lua"><pre class="de1">love<span class="sy0">.</span>graphics<span class="sy0">.</span>printf<span class="br0">&#40;</span> coloredtext<span class="sy0">,</span> font<span class="sy0">,</span> x<span class="sy0">,</span> y<span class="sy0">,</span> limit<span class="sy0">,</span> align<span class="sy0">,</span> angle<span class="sy0">,</span> sx<span class="sy0">,</span> sy<span class="sy0">,</span> ox<span class="sy0">,</span> oy<span class="sy0">,</span> kx<span class="sy0">,</span> ky <span class="br0">&#41;</span></pre></div></div>
<h3><span class="mw-headline" id="Arguments_6">Arguments</span></h3>
<dl><dt><code><a href="table.html" title="table">table</a> coloredtext</code></dt>
<dd> A table containing colors and strings to add to the object, in the form of <code>{color1, string1, color2, string2, ...}</code>.
<dl><dt><code><a href="table.html" title="table">table</a> color1</code></dt>
<dd> A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of <code>{red, green, blue, alpha}</code>.</dd>
<dt><code><a href="string.html" title="string">string</a> string1</code></dt>
<dd> A string of text which has a color specified by the previous color.</dd>
<dt><code><a href="table.html" title="table">table</a> color2</code></dt>
<dd> A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of <code>{red, green, blue, alpha}</code>.</dd>
<dt><code><a href="string.html" title="string">string</a> string2</code></dt>
<dd> A string of text which has a color specified by the previous color.</dd>
<dt><code><a href="" class="new" title="tables and strings (page does not exist)">tables and strings</a> ...</code></dt>
<dd> Additional colors and strings.</dd></dl></dd></dl>
<dl><dt><code><a href="font.html" title="Font">Font</a> font</code></dt>
<dd> The Font object to use.</dd>
<dt><code><a href="number.html" title="number">number</a> x</code></dt>
<dd> The position on the x-axis.</dd>
<dt><code><a href="number.html" title="number">number</a> y</code></dt>
<dd> The position on the y-axis.</dd>
<dt><code><a href="number.html" title="number">number</a> limit</code></dt>
<dd> Wrap the line after this many horizontal pixels.</dd>
<dt><code><a href="alignmode.html" title="AlignMode">AlignMode</a> align ("left")</code></dt>
<dd> The alignment.</dd>
<dt><code><a href="number.html" title="number">number</a> angle (0)</code></dt>
<dd> Orientation (radians).</dd>
<dt><code><a href="number.html" title="number">number</a> sx (1)</code></dt>
<dd> Scale factor (x-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> sy (sx)</code></dt>
<dd> Scale factor (y-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> ox (0)</code></dt>
<dd> Origin offset (x-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> oy (0)</code></dt>
<dd> Origin offset (y-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> kx (0)</code></dt>
<dd> Shearing factor (x-axis).</dd>
<dt><code><a href="number.html" title="number">number</a> ky (0)</code></dt>
<dd> Shearing factor (y-axis).</dd></dl>
<h3><span class="mw-headline" id="Returns_6">Returns</span></h3>
<p>Nothing.
</p>
<h3><span class="mw-headline" id="Notes_2">Notes</span></h3>
<p>The color set by <a href="love.graphics31.html" title="love.graphics.setColor">love.graphics.setColor</a> will be combined (multiplied) with the colors of the text.
</p>
<h2><span class="mw-headline" id="Function_7">Function</span></h2>
<table class="new-section" bgcolor="#d0d0ff" style="margin-top: 1em; padding: 3px; border-radius:5px; -moz-border-radius:5px;" data-newin="&#91;&#91;11.0]]">
<tr>
<td><i> <b>Available since LÖVE <a href="113.html" title="11.0">11.0</a></b> </i>
</td></tr>
<tr>
<td> <small>This variant is not supported in earlier versions.</small>
</td></tr></table>
<h3><span class="mw-headline" id="Synopsis_7">Synopsis</span></h3>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="lua source-lua"><pre class="de1">love<span class="sy0">.</span>graphics<span class="sy0">.</span>printf<span class="br0">&#40;</span> coloredtext<span class="sy0">,</span> transform<span class="sy0">,</span> limit<span class="sy0">,</span> align <span class="br0">&#41;</span></pre></div></div>
<h3><span class="mw-headline" id="Arguments_7">Arguments</span></h3>
<dl><dt><code><a href="table.html" title="table">table</a> coloredtext</code></dt>
<dd> A table containing colors and strings to add to the object, in the form of <code>{color1, string1, color2, string2, ...}</code>.
<dl><dt><code><a href="table.html" title="table">table</a> color1</code></dt>
<dd> A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of <code>{red, green, blue, alpha}</code>.</dd>
<dt><code><a href="string.html" title="string">string</a> string1</code></dt>
<dd> A string of text which has a color specified by the previous color.</dd>
<dt><code><a href="table.html" title="table">table</a> color2</code></dt>
<dd> A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of <code>{red, green, blue, alpha}</code>.</dd>
<dt><code><a href="string.html" title="string">string</a> string2</code></dt>
<dd> A string of text which has a color specified by the previous color.</dd>
<dt><code><a href="" class="new" title="tables and strings (page does not exist)">tables and strings</a> ...</code></dt>
<dd> Additional colors and strings.</dd></dl></dd></dl>
<dl><dt><code><a href="transform.html" title="Transform">Transform</a> transform</code></dt>
<dd> Transformation object.</dd>
<dt><code><a href="number.html" title="number">number</a> limit</code></dt>
<dd> Wrap the line after this many horizontal pixels.</dd>
<dt><code><a href="alignmode.html" title="AlignMode">AlignMode</a> align ("left")</code></dt>
<dd> The alignment.</dd></dl>
<h3><span class="mw-headline" id="Returns_7">Returns</span></h3>
<p>Nothing.
</p>
<h3><span class="mw-headline" id="Notes_3">Notes</span></h3>
<p>The color set by <a href="love.graphics31.html" title="love.graphics.setColor">love.graphics.setColor</a> will be combined (multiplied) with the colors of the text.
</p>
<h2><span class="mw-headline" id="Function_8">Function</span></h2>
<table class="new-section" bgcolor="#d0d0ff" style="margin-top: 1em; padding: 3px; border-radius:5px; -moz-border-radius:5px;" data-newin="&#91;&#91;11.0]]">
<tr>
<td><i> <b>Available since LÖVE <a href="113.html" title="11.0">11.0</a></b> </i>
</td></tr>
<tr>
<td> <small>This variant is not supported in earlier versions.</small>
</td></tr></table>
<h3><span class="mw-headline" id="Synopsis_8">Synopsis</span></h3>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="lua source-lua"><pre class="de1">love<span class="sy0">.</span>graphics<span class="sy0">.</span>printf<span class="br0">&#40;</span> coloredtext<span class="sy0">,</span> font<span class="sy0">,</span> transform<span class="sy0">,</span> limit<span class="sy0">,</span> align <span class="br0">&#41;</span></pre></div></div>
<h3><span class="mw-headline" id="Arguments_8">Arguments</span></h3>
<dl><dt><code><a href="table.html" title="table">table</a> coloredtext</code></dt>
<dd> A table containing colors and strings to add to the object, in the form of <code>{color1, string1, color2, string2, ...}</code>.
<dl><dt><code><a href="table.html" title="table">table</a> color1</code></dt>
<dd> A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of <code>{red, green, blue, alpha}</code>.</dd>
<dt><code><a href="string.html" title="string">string</a> string1</code></dt>
<dd> A string of text which has a color specified by the previous color.</dd>
<dt><code><a href="table.html" title="table">table</a> color2</code></dt>
<dd> A table containing red, green, blue, and optional alpha components to use as a color for the next string in the table, in the form of <code>{red, green, blue, alpha}</code>.</dd>
<dt><code><a href="string.html" title="string">string</a> string2</code></dt>
<dd> A string of text which has a color specified by the previous color.</dd>
<dt><code><a href="" class="new" title="tables and strings (page does not exist)">tables and strings</a> ...</code></dt>
<dd> Additional colors and strings.</dd></dl></dd></dl>
<dl><dt><code><a href="font.html" title="Font">Font</a> font</code></dt>
<dd> The Font object to use.</dd>
<dt><code><a href="transform.html" title="Transform">Transform</a> transform</code></dt>
<dd> Transformation object.</dd>
<dt><code><a href="number.html" title="number">number</a> limit</code></dt>
<dd> Wrap the line after this many horizontal pixels.</dd>
<dt><code><a href="alignmode.html" title="AlignMode">AlignMode</a> align ("left")</code></dt>
<dd> The alignment.</dd></dl>
<h3><span class="mw-headline" id="Returns_8">Returns</span></h3>
<p>Nothing.
</p>
<h3><span class="mw-headline" id="Notes_4">Notes</span></h3>
<p>The color set by <a href="love.graphics31.html" title="love.graphics.setColor">love.graphics.setColor</a> will be combined (multiplied) with the colors of the text.
</p>
<h2><span class="mw-headline" id="Examples">Examples</span></h2>
<p>Draw text to the screen with right alignment and a horizontal limit of 125.
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="lua source-lua"><pre class="de1">love<span class="sy0">.</span>graphics<span class="sy0">.</span>printf<span class="br0">&#40;</span><span class="st0">&quot;This text is aligned right, and wraps when it gets too big.&quot;</span><span class="sy0">,</span> <span class="nu0">25</span><span class="sy0">,</span> <span class="nu0">25</span><span class="sy0">,</span> <span class="nu0">125</span><span class="sy0">,</span> <span class="st0">&quot;right&quot;</span><span class="br0">&#41;</span></pre></div></div>
<h2><span class="mw-headline" id="Notes_5">Notes</span></h2>
<p>Note that the limit argument affects the position of your text for 'center' and 'right' alignment.
</p>
<div dir="ltr" class="mw-geshi mw-code mw-content-ltr"><div class="lua source-lua"><pre class="de1">love<span class="sy0">.</span>graphics<span class="sy0">.</span>printf<span class="br0">&#40;</span><span class="st0">&quot;This text is aligned center&quot;</span><span class="sy0">,</span><span class="nu0">100</span><span class="sy0">,</span> <span class="nu0">100</span><span class="sy0">,</span> <span class="nu0">200</span><span class="sy0">,</span><span class="st0">&quot;center&quot;</span><span class="br0">&#41;</span> <span class="co1">-- center your text around x = 200/2 + 100 = 200</span>
love<span class="sy0">.</span>graphics<span class="sy0">.</span>printf<span class="br0">&#40;</span><span class="st0">&quot;This text is aligned right&quot;</span><span class="sy0">,</span><span class="nu0">100</span><span class="sy0">,</span> <span class="nu0">100</span><span class="sy0">,</span> <span class="nu0">200</span><span class="sy0">,</span><span class="st0">&quot;right&quot;</span><span class="br0">&#41;</span> <span class="co1">-- align right to x = 100 + 200 = 300</span></pre></div></div>
<h2><span class="mw-headline" id="See_Also">See Also</span></h2>
<ul><li> <a href="love6.html" title="love.graphics">love.graphics</a></li>
<li> <a href="font_getwrap.html" title="Font:getWrap">Font:getWrap</a></li></ul>
<p><br />
</p><p><br />
</p>
<h2><span class="mw-headline" id="Other_Languages">Other Languages</span></h2>
<div class="i18n">
<p><a href="" class="new" title="love.graphics.printf (Dansk) (page does not exist)">Dansk</a>&#160;&#8211;
<a href="love.graphics47.html" title="love.graphics.printf (Deutsch)">Deutsch</a>&#160;&#8211;
<strong class="selflink">English</strong>&#160;&#8211; 
<a href="" class="new" title="love.graphics.printf (Español) (page does not exist)">Español</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Français) (page does not exist)">Français</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Indonesia) (page does not exist)">Indonesia</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Italiano) (page does not exist)">Italiano</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Lietuviškai) (page does not exist)">Lietuviškai</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Magyar) (page does not exist)">Magyar</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Nederlands) (page does not exist)">Nederlands</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Polski) (page does not exist)">Polski</a>&#160;&#8211;
<a href="love.graphics48.html" title="love.graphics.printf (Português)">Português</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Română) (page does not exist)">Română</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Slovenský) (page does not exist)">Slovenský</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Suomi) (page does not exist)">Suomi</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Svenska) (page does not exist)">Svenska</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Türkçe) (page does not exist)">Türkçe</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Česky) (page does not exist)">Česky</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Ελληνικά) (page does not exist)">Ελληνικά</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Български) (page does not exist)">Български</a>&#160;&#8211;
<a href="love.graphics49.html" title="love.graphics.printf (Русский)">Русский</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Српски) (page does not exist)">Српски</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Українська) (page does not exist)">Українська</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (עברית) (page does not exist)">עברית</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (ไทย) (page does not exist)">ไทย</a>&#160;&#8211;
<a href="love.graphics50.html" title="love.graphics.printf (日本語)">日本語</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (正體中文) (page does not exist)">正體中文</a>&#160;&#8211;
<a href="love.graphics51.html" title="love.graphics.printf (简体中文)">简体中文</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (Tiếng Việt) (page does not exist)">Tiếng Việt</a>&#160;&#8211;
<a href="" class="new" title="love.graphics.printf (한국어) (page does not exist)">한국어</a> 
<br />
<span style="text-align:right;"><i><a href="help_i18n.html" title="Help:i18n">More info</a></i></span>
</p>
</div>

<!-- 
NewPP limit report
CPU time usage: 0.268 seconds
Real time usage: 0.398 seconds
Preprocessor visited node count: 1808/1000000
Preprocessor generated node count: 5029/1000000
Post‐expand include size: 15772/2097152 bytes
Template argument size: 7983/2097152 bytes
Highest expansion depth: 5/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key love2d_wiki:pcache:idhash:142-0!*!0!!*!5!* and timestamp 20210227025658 and revision id 22714
 -->
</div><div class="printfooter">
Retrieved from "<a dir="ltr" href="">http://love2d.org/w/index.php?title=love.graphics.printf&amp;oldid=22714</a>"</div>
					<div id='catlinks' class='catlinks'><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="" title="Special:Categories">Category</a>: <ul><li><a href="category_functions.html" title="Category:Functions">Functions</a></li></ul></div></div>					<!-- end content -->
										<div class="visualClear"></div>
				</div>
			</div>
		</div>
		<div id="column-one">
			<div class="portlet" id="p-personal" role="navigation">
				<h5>Personal tools</h5>

				<div class="pBody">
					<ul>
													<li id="pt-login"><a href="" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o">Log in</a></li>
											</ul>
				</div>
			</div>
			<div class="portlet" id="p-logo" role="banner">
				<a href="index.html" class="mw-wiki-logo" title="Visit the main page"></a>
			</div>
				<div class="generated-sidebar portlet" id="p-documentation" role="navigation">
		<h5>documentation</h5>
		<div class='pBody'>
							<ul>
											<li id="n-love"><a href="love.html">love</a></li>
											<li id="n-love.audio"><a href="love1.html">love.audio</a></li>
											<li id="n-love.data"><a href="love2.html">love.data</a></li>
											<li id="n-love.event"><a href="love3.html">love.event</a></li>
											<li id="n-love.filesystem"><a href="love4.html">love.filesystem</a></li>
											<li id="n-love.font"><a href="love5.html">love.font</a></li>
											<li id="n-love.graphics"><a href="love6.html">love.graphics</a></li>
											<li id="n-love.image"><a href="love7.html">love.image</a></li>
											<li id="n-love.joystick"><a href="love8.html">love.joystick</a></li>
											<li id="n-love.keyboard"><a href="love9.html">love.keyboard</a></li>
											<li id="n-love.math"><a href="love10.html">love.math</a></li>
											<li id="n-love.mouse"><a href="love11.html">love.mouse</a></li>
											<li id="n-love.physics"><a href="love12.html">love.physics</a></li>
											<li id="n-love.sound"><a href="love13.html">love.sound</a></li>
											<li id="n-love.system"><a href="love14.html">love.system</a></li>
											<li id="n-love.thread"><a href="love15.html">love.thread</a></li>
											<li id="n-love.timer"><a href="love16.html">love.timer</a></li>
											<li id="n-love.touch"><a href="love17.html">love.touch</a></li>
											<li id="n-love.video"><a href="love18.html">love.video</a></li>
											<li id="n-love.window"><a href="love19.html">love.window</a></li>
											<li id="n-lua-enet"><a href="lua_enet.html">lua-enet</a></li>
											<li id="n-luasocket"><a href="socket.html">luasocket</a></li>
											<li id="n-utf8"><a href="utf8.html">utf8</a></li>
									</ul>
					</div>
		</div>
		<div class="generated-sidebar portlet" id="p-navigation" role="navigation">
		<h5>Navigation</h5>
		<div class='pBody'>
							<ul>
											<li id="n-Home"><a href="love2d1.html" rel="nofollow">Home</a></li>
											<li id="n-Forums"><a href="forums.html" rel="nofollow">Forums</a></li>
											<li id="n-Issue-tracker"><a href="https://github.com/love2d/love/issues" rel="nofollow">Issue tracker</a></li>
									</ul>
					</div>
		</div>
		<div class="generated-sidebar portlet" id="p-wiki_navigation" role="navigation">
		<h5>wiki navigation</h5>
		<div class='pBody'>
							<ul>
											<li id="n-mainpage-description"><a href="index.html" title="Visit the main page [z]" accesskey="z">Main page</a></li>
											<li id="n-recentchanges"><a href="" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li>
											<li id="n-randompage"><a href="" title="Load a random page [x]" accesskey="x">Random page</a></li>
									</ul>
					</div>
		</div>
			<div id="p-search" class="portlet" role="search">
			<h5><label for="searchInput">Search</label></h5>

			<div id="searchBody" class="pBody">
				<form action="w.html" id="searchform">
					<input type='hidden' name="title" value="Special:Search"/>
					<input type="search" name="search" placeholder="Search" title="Search LOVE [f]" accesskey="f" id="searchInput" />
					<input type="submit" name="go" value="Go" title="Go to a page with this exact name if exists" id="searchGoButton" class="searchButton" />&#160;
						<input type="submit" name="fulltext" value="Search" title="Search the pages for this text" id="mw-searchButton" class="searchButton" />
				</form>

							</div>
		</div>
			<div class="portlet" id="p-tb" role="navigation">
			<h5>Tools</h5>

			<div class="pBody">
				<ul>
											<li id="t-whatlinkshere"><a href="" title="A list of all wiki pages that link here [j]" accesskey="j">What links here</a></li>
											<li id="t-recentchangeslinked"><a href="" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li>
											<li id="t-specialpages"><a href="" title="A list of all special pages [q]" accesskey="q">Special pages</a></li>
											<li id="t-print"><a href="" rel="alternate" title="Printable version of this page [p]" accesskey="p">Printable version</a></li>
											<li id="t-permalink"><a href="" title="Permanent link to this revision of the page">Permanent link</a></li>
											<li id="t-info"><a href="">Page information</a></li>
											<li id="t-smwbrowselink"><a href="" rel="smw-browse">Browse properties</a></li>
									</ul>
							</div>
		</div>
			</div><!-- end of the left (by default at least) column -->
		<div class="visualClear"></div>
					<div id="footer" role="contentinfo">
						<div id="f-copyrightico">
									<a href="http://www.gnu.org/copyleft/fdl.html"><img src="gnu_fdl.png" alt="GNU Free Documentation License 1.3" width="88" height="31" /></a>
							</div>
					<div id="f-poweredbyico">
									<a href="http://www.mediawiki.org/"><img src="poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" width="88" height="31" /></a>
									<a href="https://www.semantic-mediawiki.org/wiki/Semantic_MediaWiki"><img src="smw_button.png" alt="Powered by Semantic MediaWiki" width="88" height="31" /></a>
							</div>
					<ul id="f-list">
									<li id="lastmod"> This page was last modified on 28 May 2019, at 00:22.</li>
									<li id="viewcount">This page has been accessed 120,020 times.</li>
									<li id="copyright">Content is available under <a class="external" rel="nofollow" href="http://www.gnu.org/copyleft/fdl.html">GNU Free Documentation License 1.3</a> unless otherwise noted.</li>
									<li id="privacy"><a href="love_privacy_policy.html" title="LOVE:Privacy policy">Privacy policy</a></li>
									<li id="about"><a href="love_about.html" title="LOVE:About">About LOVE</a></li>
									<li id="disclaimer"><a href="love_general_disclaimer.html" title="LOVE:General disclaimer">Disclaimers</a></li>
							</ul>
		</div>
		</div>
		<script>/*<![CDATA[*/window.jQuery && jQuery.ready();/*]]>*/</script><script>if(window.mw){
mw.loader.state({"site":"loading","user":"ready","user.groups":"ready"});
}</script>
<script>if(window.mw){
mw.loader.load(["ext.smw.tooltips","mediawiki.action.view.postEdit","mediawiki.user","mediawiki.hidpi","mediawiki.page.ready","mediawiki.searchSuggest"],null,true);
}</script>
<script>if(window.mw){
document.write("\u003Cscript src=\"http://love2d.org/w/load.php?debug=false\u0026amp;lang=en\u0026amp;modules=site\u0026amp;only=scripts\u0026amp;skin=love\u0026amp;*\"\u003E\u003C/script\u003E");
}</script>
<script>if(window.mw){
mw.config.set({"wgBackendResponseTime":74});
}</script></body></html>
